#ifndef WINDOW_H
#define WINDOW_H

#include <QWindow>
#include <QWidget>

class Renderer;
class GLWidget;

class Window: public QWidget
{
    Q_OBJECT
public:
    enum RotationDir { DirLeft, DirRight, DirUp, DirDown };

    Window();
    void setRenderer(Renderer* rendrer);

protected:
    void timerEvent(QTimerEvent* event);
    void wheelEvent(QWheelEvent* event);
    void keyPressEvent(QKeyEvent* event);

private slots:
    void rotateOneStep();
    void setCurrentGlWidget();

private:
#if _OLD_CODE_
    Renderer* m_rendrer;
    RotationDir m_rotationDir;
#else
    enum { NumRows = 2, NumColumns = 3 };

    GLWidget *glWidgets[NumRows][NumColumns];
    GLWidget *currentGlWidget;
#endif
};

#endif // WINDOW_H
